from flask import Flask
from settings import Config, db  # 确保 settings 中有 Config 和 db
from models import BigHouse  # 确保 models 中有 BigHouse
from index_page import index_page  # 确保导入了正确的 Blueprint 对象

app = Flask(__name__)
app.config.from_object(Config)
db.init_app(app)

# 将蓝图注册到app中
app.register_blueprint(index_page, url_prefix='/')

if __name__ == '__main__':
    app.run(debug=True)
